<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * Class CreateMedicalMarriagehistoryTable
 * 月经婚育史数据库
 */
class CreateMedicalMarriagehistoryTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('st_medical_marriagehistory', function (Blueprint $table) {
            $table->increments('id')->comment("月经婚育史");
            $table->unsignedInteger('record_id')->index()->comment("关联medical_records_id");
            $table->text('marriage')->default('')->comment("婚姻情况");
            $table->tinyInteger('macrosomia')->nullable()->comment('巨大儿情况');
            $table->text('menstruation')->default('')->comment('月经情况');
            $table->text('menopause')->default('')->comment('绝经情况');
            $table->string('remark')->default('')->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('st_medical_marriagehistory');
    }
}
